/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.customer.points.details.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.sys.entity.EmpUser;

/**
 * 客户积分明细Entity
 * @author zpp
 * @version 2020-03-13
 */
@Table(name="t_customer_points_details", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="category_type", attrName="categoryType", label="类型"),
		@Column(name="content", attrName="content", label="内容"),
		@Column(name="change", attrName="change", label="变动"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="points", attrName="points", label="积分"),
	},
	joinTable = {
		@JoinTable(type=Type.LEFT_JOIN,entity=EmpUser.class,alias = "u",on = "a.create_by=u.user_code",attrName = "empUser",columns= {
			@Column(name="user_name")
		})	
	},extWhereKeys = "dsf", orderBy="a.update_date DESC"
)
public class TcustomerPointsDetails extends DataEntity<TcustomerPointsDetails> {
	
	private static final long serialVersionUID = 1L;
	private String categoryType;		// 类型
	private String content;		// 内容
	private Long change;		// 变动
	private Long points;		// 积分
	
	public TcustomerPointsDetails() {
		this(null);
	}

	public TcustomerPointsDetails(String id){
		super(id);
	}
	
	@Length(min=0, max=30, message="类型长度不能超过 30 个字符")
	public String getCategoryType() {
		return categoryType;
	}

	public void setCategoryType(String categoryType) {
		this.categoryType = categoryType;
	}
	
	@Length(min=0, max=100, message="内容长度不能超过 100 个字符")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=0, max=30, message="变动长度不能超过 30 个字符")
	public Long getChange() {
		return change;
	}

	public void setChange(Long change) {
		this.change = change;
	}
	
	public Long getPoints() {
		return points;
	}

	public void setPoints(Long points) {
		this.points = points;
	}
	
}